﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.Collections.ObjectModel;

namespace UmlControlLibrary
{
    public abstract class UmlMemberElement:UmlElement, INotifyPropertyChanged
    {
        public abstract string ElementLabel
        {
            get;
            set;
        }

        public abstract string TypeName
        {
            get;
            set;
        }

        private string _elementName;
        public string ElementName
        {
            get { return _elementName; }
            set
            {
                value = value.Trim();
                if (value.Length > 0) _elementName = value;
                OnPropertyChanged("ElementName");
                OnPropertyChanged("ElementLabel");
            }
        }

        UmlModifier _modifiers = UmlModifier._public;
        public UmlModifier Modifiers
        {
            get { return _modifiers; }
            set
            {
                _modifiers = value;
                OnPropertyChanged("Modifier");
                OnPropertyChanged("ElementLabel");
            }
        }

        private string _stereoType = "";
        public string StereoType
        {
            get { return _stereoType; }
            set
            {
                _stereoType = value.Trim();
                OnPropertyChanged("StereoType");
                OnPropertyChanged("ElementLabel");
            }
        }

    }
}
